#include "llcomp_llc.h" 

    

     
     void loopParallelFor0_support(  int *_i,  double *a,  int *_l,  int *_m,  int *_n,  int *_k,  double *c,  double *_R,  int *_j,  double *b) ;
     void loopParallelFor0_support(  int *_i,  double *a,  int *_l,  int *_m,  int *_n,  int *_k,  double *c,  double *_R,  int *_j,  double *b)  {
                 int i = *_i;
                 int l = *_l;
                 int m = *_m;
                 int n = *_n;
                 int k = *_k;
                 double R = *_R;
                 int j = *_j;
        /* Begin template: forall_init_unit.tmpl */

/* $0 => Variable del bucle
 * loop_initial => Valor inicial de la variable del bucle B
 * loop_finalice => Valor final de la variable del bucle C
 */

{
    int llc_meanT, llc_rnT;
    register int llc_i;

    llc_nT = ((n - 1) - (0) + 1);
    /* Medium number of tasks */
    llc_meanT = llc_nT / LLC_NUMPROCESSORS;
    /* Number of unassigned tasks */
    llc_rnT = llc_nT % LLC_NUMPROCESSORS;

    LLC_CHECK_MALLOC (llc_F, (LLC_NUMPROCESSORS + 1), int);

    llc_F[0] = 0;
    for (llc_i = 1; llc_i < (LLC_NUMPROCESSORS + 1); llc_i++) {
        llc_F[llc_i] = llc_F[llc_i-1] + llc_meanT + (((llc_i - 1) < llc_rnT) ? 1 : 0);
    }
}

/* End template: forall_init_unit.tmpl */
/* Begin template: forall_exec_unit.tmpl */

/* loop_var => Variable del bucle
 * loop_initial => Valor inicial de la variable del bucle
 * loop_stmt => Bloque del bucle
 */

{
    int llc_nP;
    int llc_grp_save;
    register int llc_i;

    llc_nP = LLC_NUMPROCESSORS;
    llc_grp_save = LLC_NAME;
    LLC_NUMPROCESSORS = 1;
    LLC_NAME = 0;
    
    j = (0) + llc_F[llc_grp_save];
    for (llc_i = 0; llc_i < LLC_PROCSGRP(llc_grp_save); llc_i++, j++) {
        
{

  for (i= 0; i < l; (i++ ))  
{

R= 0.0;
    for (k= 0; k < m; (k++ )) R+= b[i + (k * l)] * a[k + (j * m)] ;
c[i + (j * l)]= R;
  }

 ;
}

;
    }

    LLC_NAME = llc_grp_save;
    LLC_NUMPROCESSORS = llc_nP;
}

/* End template: forall_exec_unit.tmpl */
/* Begin template: forall_exit.tmpl */

    free(llc_F);
    llc_F = NULL;

/* End template: forall_exit.tmpl */

                *_i = i;
                *_l = l;
                *_m = m;
                *_n = n;
                *_k = k;
                *_R = R;
                *_j = j;

    }

    